<%
# #sample hook:
#def perspective_nav_menu_custom(args)
    # args[:custom_menus]['pers_features'] = {link: "#{current_site.the_url(as_path: true)}#features", title: 'Features'}
    # args[:custom_menus]['pers_portfolio'] = {link: "#{current_site.the_url(as_path: true)}#portfolio", title: 'Portfolio'}
    # args[:custom_menus]['pers_contact_us'] = {link: "#{current_site.the_url(as_path: true)}#contact", title: 'Contact Us'}
# end
r = {custom_menus: {}, menu: @nav_menu}; hooks_run("nav_menu_custom", r) %>
<% if r[:custom_menus].present? %>
    <div class="panel panel-default panel-toggled custom_menus">
        <div class="panel-heading">
            <h4 data-type="post_type" class="panel-title class_type">
                <%= t("zerocms.admin.menus.custom_menus", default: "Custom Menus") %>
            </h4>
            <ul class="panel-controls">
                <li><a class="panel-collapse" href="#" title=""><span class="fa fa-angle-down"></span></a></li>
            </ul>
        </div>
        <div class="panel-body">
            <div class="tab-pane active class_type">
                <ul class="list-unstyled">
                    <% r[:custom_menus].each do |k, item| %>
                        <% if item[:link].present? %>
                            <li>
                                <label class="class_slug" data-post_link_edit="<%= item[:edit_link] %>">
                                    <input type="checkbox" value="<%= item[:id] || item[:link] %>" data-kind="<%= item[:kind] %>" data-label="<%= item[:title] %>"> <%= item[:title] %>
                                </label>
                            </li>
                        <% else %>
                            <li>
                                <h4><%= item[:title] %></h4>
                            </li>
                        <% end %>
                    <% end %>
                </ul>
            </div>
            <div class="panel-footer">
                <button type="" class="add_links_custom_to_menu btn btn-primary pull-right"><%= t('zerocms.admin.button.add_menu') %> <i class="fa fa-arrow-right"></i></button>
            </div>
        </div>
    </div>
<% end %>